package com.herenit.order_model.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Message<T> {

    private String code;   // 消息处理的结果code
    private String message;// 消息处理的结果信息
    private T result;      // 队列中获取的消息对象

    public Message(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public Message(String message, T result) {
        this.message = message;
        this.result = result;
    }

    public Message(String message) {
        this.message = message;
    }
}
